<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script type="module">
        // CommonJS和AMD
        // ES6 module
        import obj,{name,age,sayName} from './modules/index.js'
        console.log(obj);
        console.log(name);
        console.log(age);
        console.log(sayName());

        import * as index from './modules/index.js'

        console.log(index.default);
        console.log(index.name);
        console.log(index.age);
        console.log(index.sayName());
    </script>
</body>
</html>